package org.tailor
/**
 * The Tailor entity.
 *
 * @author    
 *
 *
 */
class Tailor {
    static mapping = {
         table 'tailor'
         // version is set to false, because this isn't available by default for legacy databases
         version false
         id generator:'identity', column:'id'
         regionsIdRegions column:'regions_id'
    }
    Long id
    String address
    String contactName
    String country
    String email
    Integer fax
    String account
    String notes
    String password
    Integer phone
    Integer postalCode
    String companyName
    String url
    // Relation
    Regions regionsIdRegions

    static constraints = {
        id(max: 9223372036854775807L)
        address(size: 1..255, blank: false)
        contactName(size: 1..255, blank: false)
        country(size: 1..255, blank: false)
        email(size: 1..255, blank: false)
        fax(max: 2147483647)
        account(size: 1..255, blank: false)
        notes(size: 1..255, blank: false)
        password(size: 1..255, blank: false)
        phone(max: 2147483647)
        postalCode(max: 2147483647)
        companyName(size: 1..255, blank: false)
        url(size: 1..255, blank: false)
        regionsIdRegions()
    }
    String toString() {
        return "${companyName}" 
    }
}
